package com.user.test.model.database

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity(tableName = "search_db")
data class SearchResult (
    @PrimaryKey(autoGenerate = true)
    val id : Int,

    @ColumnInfo(name = "title")
    val title : String?,

    @ColumnInfo(name = "thread_precedent")
    var threadPrecedence : Int?,

    @ColumnInfo(name = "link_on_page")
    val linkOnPage : String?
){
    constructor(title: String, threadPrecedence: Int, linkOnPage: String) : this(
        id = 0,
        title,
        threadPrecedence,
        linkOnPage
    )
}